package org.csmz.xg2334class;
class CarFactory {
    private static int totalCars = 0;

    public static void produceCar() {
        totalCars++;
        System.out.println("成功生产一辆汽车，当前生产线上汽车数量: " + totalCars);
    }

    // 获取当前生产线上汽车的总数量
    public static int getTotalCars() {
        return totalCars;
    }
}
